#!/bin/bash

apt install build-essential curl zip openjdk-8-jdk vim -y



# 下载
curl -OL https://www.ffmpeg.org/releases/ffmpeg-5.0.tar.xz
# 解压
tar xvJf ffmpeg-5.0.tar.xz




# 下载 Command Line Tools
curl -OL https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip
# 解压 Commmand Line Tools
unzip commandlinetools-linux-7583922_latest.zip
# 设置 android sdk 目录
mkdir -pv ~/.local/android
# 配置 Command Line Tools
mkdir -pv ~/.local/android/cmdline-tools/
mv cmdline-tools ~/.local/android/cmdline-tools/latest
# 添加环境变量
echo "export PATH=$HOME/.local/android/cmdline-tools/latest/bin:$PATH" >> ~/.bashrc
# 使环境变量生效
source ~/.bashrc
# 安装 NDK，注意这里需要同意下协议！！
sdkmanager --install "ndk;23.1.7779620"


